//
//  UIImageView+LoadFile.m
//  fTalk
//
//  Created by baifeng on 15/10/29.
//
//

#import "UIImage+LoadFile.h"


#import <objc/runtime.h>
#import "JRSwizzle.h"


@implementation UIImage(UIImage_LoadFile)

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

//+ (void)load
//{
//    static dispatch_once_t onceTokenPopVC;
//    dispatch_once(&onceTokenPopVC, ^{
//        [self hackForImageWithFile];
//    });
//}
//
//+ (void)hackForImageWithFile
//{
//    [[self class] jr_swizzleMethod:NSSelectorFromString(@"imageNamed:") withMethod:@selector(itImageNamed:) error:nil];
//}
//
//+ (UIImage *)itImageNamed:(NSString *)name
//{
//    UIImage * image = [[self class]itImageNamed:name];
//    NSData * data = [[NSData alloc]initWithContentsOfFile:[[NSBundle mainBundle]pathForResource:name ofType:nil]];
//    UIImage * dataImage = [UIImage imageWithData:data];
//    return dataImage;
//}

/*+ (UIImage *)imageNamed:(NSString *)name
{
    NSData * data = [[NSData alloc]initWithContentsOfFile:[[NSBundle mainBundle]pathForResource:name ofType:nil]];
    UIImage * dataImage = [UIImage imageWithData:data];
    return dataImage;
}*/

@end
